package stu;

import javax.xml.crypto.Data;
import java.io.File;
import java.util.Calendar;
import java.util.Locale;

import static java.lang.String.format;

/**
 * @author small瑞
 * IO流   input输入   output输出流
 */
public class FileStu {
    public static void main(String[] args) {
        File file = new File("D:\\");
        File[] files = file.listFiles();
        for(File f : files){
            if(f.isFile()){
                Locale from = Locale.US;
                System.out.println("文件:"+f.getName()+" 修改时间:"+String.format(from,"%tc",f.lastModified()));
            }
            else {
                Locale from = Locale.CHINA;
                System.out.println("文件夹:"+f.getName()+" 修改时间:"+String.format(from,"%tc",f.lastModified()));
            }
        }
        System.out.println("---------------------------------------------------");
        String ttt = "%tY年"+"%tm月"+"%td日";
        System.out.println(String.format(ttt, Calendar.getInstance(),Calendar.getInstance(),Calendar.getInstance()));
        System.out.println("---------------------------------------------------");
        int t = 5 ;
        String s ;
        s = Integer.toString(t,2);
        System.out.println(s);
        String ss = "5468";
        int tt ;
        tt = Integer.valueOf(ss,9);
        System.out.println(tt);
        ss = String.format("%h",56);
        System.out.println(ss);
        String data ;
        System.out.println("------------------------------------------------");
        StuMayDay15 ssssss = StuMayDay15.getStu();
        System.out.println(ssssss);

    }
}
